package cc.rboot.topic.core;

public interface IMessageTopic<T> {

    String name();

    /**
     * 返回一个单例的processor
     * 每个topic实例只允许有一个processor实例
     *
     * @return
     */
    IMessageProcessor<T> processor();

    void registerConsumers(IMessageConsumer<T> consumer);

    void send(T message) throws Exception;
}
